package com.cq.hd.member.service.impl;

import com.cq.hd.common.entity.mq.UserLoginRecordMsg;
import com.cq.hd.common.utils.BeanUtils;
import com.cq.hd.member.po.TbUserLoginRecordPo;
import com.cq.hd.member.mapper.TbUserLoginRecordMapper;
import com.cq.hd.member.service.TbUserLoginRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户登录记录表 服务实现类
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-23
 */
@Service
public class TbUserLoginRecordServiceImpl extends ServiceImpl<TbUserLoginRecordMapper, TbUserLoginRecordPo> implements TbUserLoginRecordService {

    @Override
    public Boolean saveUserLoginRecord(UserLoginRecordMsg userLoginRecordMsg) {
        TbUserLoginRecordPo tbUserLoginRecordPo = new TbUserLoginRecordPo();
        BeanUtils.copyProperties(userLoginRecordMsg, tbUserLoginRecordPo);
        return baseMapper.insert(tbUserLoginRecordPo) > 0;
    }
}
